﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ResultShow.aspx.cs" Inherits="ResultShow"
    MasterPageFile="~/Master.master" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2.Linq, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxDataView" TagPrefix="dx" %>
<asp:Content ID="HeadC" ContentPlaceHolderID="head" runat="Server">
    <%-- <link type="text/css" rel="stylesheet" href="Content/Site.css" />--%>
    <style type="text/css">
        .style1
        {
            width: 158px;
        }
        .style3
        {
            width: 201px;
        }
        .style4
        {
            width: 83px;
        }
        .style5
        {
            width: 104px;
        }
        .style6
        {
            width: 205px;
        }
    </style>
    <style type="text/css">
        .divResult
        {
        display: block;
        width: 100px;
        overflow: hidden;   
        white-space: nowrap;
        -o-text-overflow: ellipsis;
        text-overflow: ellipsis;
        }
  </style>

</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <h1 class="DemoTitle">
        项目成果展示
    </h1>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxCallbackPanel ID="QueryCBPanel" runat="server" Width="100%" ClientInstanceName="QueryPanel"
            CssFilePath="~/App_Themes/Office2010Silver/{0}/styles.css" CssPostfix="Office2010Silver"
            OnCallback="QueryCBPanel_Callback">
            <LoadingPanelImage Url="~/App_Themes/Office2010Silver/Web/Loading.gif">
            </LoadingPanelImage>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <PanelCollection>
                <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                    <dx:ASPxPanel ID="PanelShow" runat="server" Width="100%" ClientInstanceName="ContainerPanel">
                        <PanelCollection>
                            <dx:PanelContent>
                                <table width="100%">
                                    <tr>
                                        <td class="style4">
                                            年度：
                                        </td>
                                        <td class="style6">
                                            <dx:ASPxTextBox ID="txtTime" runat="server" Width="170px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            </dx:ASPxTextBox>
                                        </td>
                                        <td class="style5">
                                            批文文号：
                                        </td>
                                        <td class="style3">
                                            <dx:ASPxComboBox ID="cmdApproalShow" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                CssPostfix="Office2010Blue" DataSourceID="cmdApproal" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                TextField="Approal_ID" ValueField="Approal_ID" Font-Size="9pt">
                                                 <ItemStyle HorizontalAlign="Left" />
                                                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                </LoadingPanelImage>
                                                <LoadingPanelStyle ImageSpacing="5px">
                                                </LoadingPanelStyle>
                                                <ButtonStyle Width="13px">
                                                </ButtonStyle>
                                            </dx:ASPxComboBox>
                                        </td>
                                        <td rowspan="2">
                                            <ul>
                                                <li class="lbutton">
                                                    <dx:ASPxButton ID="btnSearch" runat="server" Text="查询" Font-Size="10pt" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue" AutoPostBack="false" 
                                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                        <ClientSideEvents Click="function(s,e){QueryPanel.PerformCallback();}" />
                                                    </dx:ASPxButton>
                                                </li>
                                                <li class="lbutton">&nbsp;&nbsp;&nbsp;&nbsp;</li>
                                                <li class="lbutton">
                                                    <dx:ASPxButton ID="btnClear" runat="server" Text="清除过滤信息" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                        OnClick="btnClear_Click" Width="129px">
                                                    </dx:ASPxButton>
                                                </li>
                                            </ul>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style4">
                                            项目类型:
                                        </td>
                                        <td class="style6">
                                            <dx:ASPxComboBox ID="cmdTypeShow" runat="server" DataSourceID="cmdProjectType" TextField="Type_Name"
                                                ValueField="Type_ID" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                Font-Size="9pt">
                                                 <ItemStyle HorizontalAlign="Left" />
                                                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                </LoadingPanelImage>
                                                <LoadingPanelStyle ImageSpacing="5px">
                                                </LoadingPanelStyle>
                                                <ButtonStyle Width="13px">
                                                </ButtonStyle>
                                            </dx:ASPxComboBox>
                                        </td>
                                        <td class="style5">
                                            <dx:ASPxLabel ID="lblComminity" runat="server" Text="所属城区：">
                                            </dx:ASPxLabel>
                                            
                                        </td>
                                        <td class="style3">
                                            <dx:ASPxComboBox ID="cmdCommunityShow" runat="server" DataSourceID="cmdCommunity"
                                                TextField="Community_Name" ValueField="Community_ID" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                Font-Size="9pt">
                                                 <ItemStyle HorizontalAlign="Left" />
                                                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                </LoadingPanelImage>
                                                <LoadingPanelStyle ImageSpacing="5px">
                                                </LoadingPanelStyle>
                                                <ButtonStyle Width="13px">
                                                </ButtonStyle>
                                            </dx:ASPxComboBox>
                                        </td>
                                    </tr>
                                    <tr><td colspan="4"></td></tr>
                                    <tr>
                                        <td>项目名称：</td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtProName" runat="server" Width="480px" 
                                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                CssPostfix="Office2010Blue" 
                                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                </table>
                                <dx:ASPxGridView ID="gvResultShow" runat="server" Font-Size="Small" AutoGenerateColumns="False"
                                    KeyFieldName="Project_ID" PreviewFieldName="Project_Performance" EnableRowsCache="False"
                                    ClientInstanceName="QueryList" Width="100%" CssPostfix="Office2010Blue" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    DataSourceID="SqlDataSource1"  OnRowDataBound="gvResultShow_RowDataBound"
                                    OnHtmlRowPrepared="gvResultShow_HtmlRowPrepared">
                                    <%--  <Settings ShowPreview="true" ShowFilterRow="True" />--%>
                                    <%--<Settings ShowVerticalScrollBar="true" />--%>
                                    <Templates>
                                        <DetailRow>
                                            <dx:ASPxGridView ID="ASPxGridView1" runat="server" Width="100%" AutoGenerateColumns="False"
                                                DataSourceID="SqlProExcute" KeyFieldName="ID" OnBeforePerformDataSelect="ASPxGridView1_BeforePerformDataSelect">
                                                <SettingsText EmptyDataRow="没有记录" />
                                                <Columns>
                                                    <dx:GridViewDataTextColumn Caption="项目阶段" FieldName="ExeID" VisibleIndex="0" UnboundType="String">
                                                        <PropertiesTextEdit DisplayFormatString="c">
                                                        </PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="日期" FieldName="Date" VisibleIndex="3" UnboundType="DateTime">
                                                        <PropertiesTextEdit DisplayFormatString="c" DisplayFormatInEditMode="True">
                                                        </PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="使用资金" FieldName="Money" VisibleIndex="1" UnboundType="Decimal">
                                                        <PropertiesTextEdit DisplayFormatString="c" />
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="用途" FieldName="Purpose" VisibleIndex="2" UnboundType="String">
                                                        <PropertiesTextEdit DisplayFormatString="c">
                                                        </PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>
                                                </Columns>
                                                <Settings ShowFooter="true" ShowGroupFooter="VisibleIfExpanded" />
                                                <SettingsDetail IsDetailGrid="true" />
                                                <TotalSummary>
                                                    <dx:ASPxSummaryItem FieldName="Money" ShowInGroupFooterColumn="Total" SummaryType="Sum"
                                                        DisplayFormat="c" />
                                                </TotalSummary>
                                                <GroupSummary>
                                                    <dx:ASPxSummaryItem FieldName="Money" ShowInGroupFooterColumn="总计" SummaryType="Sum"
                                                        DisplayFormat="{0:c}" />
                                                </GroupSummary>
                                                <%--<GroupSummary>
                                                    <dx:ASPxSummaryItem  FieldName="Money" ShowInGroupFooterColumn="Total" 
                                                        SummaryType="Sum" DisplayFormat="{0:c}"/>
                                   
                                                </GroupSummary>--%>
                                                <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                                    </LoadingPanelOnStatusBar>
                                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                                    </LoadingPanel>
                                                </Images>
                                                <ImagesFilterControl>
                                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                                    </LoadingPanel>
                                                </ImagesFilterControl>
                                                <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                    CssPostfix="Office2010Blue">
                                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                    </Header>
                                                    <LoadingPanel ImageSpacing="5px">
                                                    </LoadingPanel>
                                                </Styles>
                                                <StylesPager>
                                                    <PageNumber ForeColor="#3E4846">
                                                    </PageNumber>
                                                    <Summary ForeColor="#1E395B">
                                                    </Summary>
                                                </StylesPager>
                                                <StylesEditors ButtonEditCellSpacing="0">
                                                    <ProgressBar Height="21px">
                                                    </ProgressBar>
                                                </StylesEditors>
                                            </dx:ASPxGridView>
                                        </DetailRow>
                                        <PreviewRow>
                                            <table style="border: none">
                                                <tbody>
                                                    <tr>
                                                        <td style="border: none">
                                                            <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Width="660px" Height="80"
                                                                Text='<%#Eval("Project_Performance") %>'></asp:TextBox>
                                                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("Project_Name") %>' CssClass="divResult"></asp:Label>

                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </PreviewRow>
                                    </Templates>
                                    <Columns>
                                        <dx:GridViewDataColumn VisibleIndex="0" Caption="项目名称" Name="T_Project_Name" FieldName="Project_Name"
                                            CellStyle-HorizontalAlign="Center">
                                            <CellStyle HorizontalAlign="Center">
                                            </CellStyle>
                                        </dx:GridViewDataColumn>
                                        <dx:GridViewDataComboBoxColumn Caption="项目类型" FieldName="Type_ID" Name="t_Type_Name"
                                            VisibleIndex="1">
                                            <PropertiesComboBox Spacing="0" ValueType="System.String" DataSourceID="cmdProjectType"
                                                TextField="Type_Name" TextFormatString="{0}" ValueField="Type_ID">
                                            </PropertiesComboBox>
                                        </dx:GridViewDataComboBoxColumn>
                                        <dx:GridViewDataComboBoxColumn Caption="所属社区" FieldName="Community_Name" Name="t_Community_Name"
                                            VisibleIndex="2">
                                            <PropertiesComboBox Spacing="0" ValueType="System.String" DataSourceID="cmdCommunity"
                                                TextFormatString="{0}" ValueField="Community_ID" TextField="Community_Name">
                                            </PropertiesComboBox>
                                        </dx:GridViewDataComboBoxColumn>
                                        <dx:GridViewDataTextColumn Caption="市级补助情况" FieldName="Project_CitySubsidy" ShowInCustomizationForm="True"
                                            VisibleIndex="4">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn Caption="批文文号" FieldName="Approal_ID" ShowInCustomizationForm="True"
                                            VisibleIndex="3">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn Caption="区（街道）资金配套情况" VisibleIndex="5" CellStyle-HorizontalAlign="Center"
                                            FieldName="Project_DistrictFund">
                                            <CellStyle HorizontalAlign="Center">
                                            </CellStyle>
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn Caption="项目总投入经费" FieldName="Project_FundsTotal" ShowInCustomizationForm="True"
                                            VisibleIndex="6">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn Caption="项目成果" ShowInCustomizationForm="True" VisibleIndex="7">
                                            <DataItemTemplate>
                                                <%-- <a href="ShowProjectImages.aspx?id=<%#Eval("Project_ID") %>">查看图片</a>--%>
                                                <a href='ShowProjectImages.aspx?id=<%#Eval("Project_ID") %>'>
                                                    <asp:Image ID="Image1" runat="server" Height="50px" ImageUrl='<%# Eval("Images_Path")%>'
                                                        Width="100px" />
                                                </a>
                                            </DataItemTemplate>
                                            <CellStyle HorizontalAlign="Center">
                                            </CellStyle>
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn Caption="查看项目成效文档" ShowInCustomizationForm="True" VisibleIndex="8">
                                            <DataItemTemplate>
                                                <a href='ProResultView.aspx?Path=<%#Eval("ProResultFile") %>'>成效附件</a>
                                                <a href="FileViewer.aspx?path=<%#Eval("Approal_File") %>">查看批文</a>
                                                
                                            </DataItemTemplate>
                                        </dx:GridViewDataTextColumn>
                                    </Columns>
                                    <SettingsPager AlwaysShowPager="True" PageSize="10" SEOFriendly="Enabled" 
                                        NumericButtonCount="15">
                                        <Summary Text="当前第{0}页，共{1}页，{2}条记录" />
                                    </SettingsPager>
                                    <SettingsText EmptyDataRow="没有记录" />
                                    <SettingsDetail ShowDetailRow="true" />
                                    <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                        </LoadingPanelOnStatusBar>
                                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                        </LoadingPanel>
                                    </Images>
                                    <ImagesFilterControl>
                                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                        </LoadingPanel>
                                    </ImagesFilterControl>
                                    <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                        </Header>
                                        <LoadingPanel ImageSpacing="5px">
                                        </LoadingPanel>
                                    </Styles>
                                    <StylesPager>
                                        <PageNumber ForeColor="#3E4846">
                                        </PageNumber>
                                        <Summary ForeColor="#1E395B">
                                        </Summary>
                                    </StylesPager>
                                    <StylesEditors ButtonEditCellSpacing="0">
                                        <ProgressBar Height="21px">
                                        </ProgressBar>
                                    </StylesEditors>
                                    <Templates>
                                        <DetailRow>
                                            <dx:ASPxGridView ID="ASPxGridView1" runat="server" Width="100%" AutoGenerateColumns="False"
                                                DataSourceID="SqlProExcute" KeyFieldName="ID" OnBeforePerformDataSelect="ASPxGridView1_BeforePerformDataSelect"
                                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                                <SettingsText EmptyDataRow="没有记录" />
                                                <Columns>
                                                    <%-- <dx:GridViewDataTextColumn Caption="使用资金" FieldName="Money" VisibleIndex="1" 
                                                        UnboundType="Decimal">
                                                        <PropertiesTextEdit DisplayFormatString="c">
                                                        </PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>--%>
                                                    <dx:GridViewDataTextColumn Caption="项目阶段" FieldName="ExeID" VisibleIndex="0" UnboundType="String"
                                                        ShowInCustomizationForm="true">
                                                        <PropertiesTextEdit DisplayFormatString="c" />
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="日期" FieldName="Date" VisibleIndex="3" UnboundType="DateTime">
                                                        <PropertiesTextEdit DisplayFormatString="c" DisplayFormatInEditMode="True">
                                                        </PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="使用资金" FieldName="Money" VisibleIndex="1" UnboundType="Decimal">
                                                        <PropertiesTextEdit DisplayFormatString="c">
                                                        </PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="用途" FieldName="Purpose" VisibleIndex="2" UnboundType="String">
                                                        <PropertiesTextEdit DisplayFormatString="c">
                                                        </PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>
                                                </Columns>
                                                <Settings ShowFooter="true" ShowGroupFooter="VisibleIfExpanded" />
                                                <SettingsDetail IsDetailGrid="true" />
                                                <TotalSummary>
                                                    <dx:ASPxSummaryItem FieldName="Money" ShowInGroupFooterColumn="总计" SummaryType="Sum"
                                                        DisplayFormat="c" />
                                                </TotalSummary>
                                                <GroupSummary>
                                                    <dx:ASPxSummaryItem FieldName="Money" ShowInGroupFooterColumn="总计" SummaryType="Sum"
                                                        DisplayFormat="{0:c}" />
                                                </GroupSummary>
                                                <%--<GroupSummary>
                                                    <dx:ASPxSummaryItem  FieldName="Money" ShowInGroupFooterColumn="Total" 
                                                        SummaryType="Sum" DisplayFormat="{0:c}"/>
                                   
                                                </GroupSummary>--%>
                                                <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                                    </LoadingPanelOnStatusBar>
                                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                                    </LoadingPanel>
                                                </Images>
                                                <ImagesFilterControl>
                                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                                    </LoadingPanel>
                                                </ImagesFilterControl>
                                                <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                    </Header>
                                                    <LoadingPanel ImageSpacing="5px">
                                                    </LoadingPanel>
                                                </Styles>
                                                <StylesPager>
                                                    <PageNumber ForeColor="#3E4846">
                                                    </PageNumber>
                                                    <Summary ForeColor="#1E395B">
                                                    </Summary>
                                                </StylesPager>
                                                <StylesEditors ButtonEditCellSpacing="0">
                                                    <ProgressBar Height="21px">
                                                    </ProgressBar>
                                                </StylesEditors>
                                            </dx:ASPxGridView>
                                        </DetailRow>
                                        <PreviewRow>
                                            <table style="border: none">
                                                <tbody>
                                                    <tr>
                                                        <td style="border: none">
                                                            <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Width="660px" Height="80"
                                                                Text='<%#Eval("Project_Performance") %>'></asp:TextBox>
                                                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("Project_Name") %>' 
                                                                CssClass="divResult"></asp:Label>

                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </PreviewRow>
                                    </Templates>
                                </dx:ASPxGridView>
                            </dx:PanelContent>
                        </PanelCollection>
                    </dx:ASPxPanel>
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxCallbackPanel>


        <div id="divResult" onmouseout="this.style.display='none';" style =" border :solid 1px red; background :#f0f0f0; display :none ; position :absolute">   
       </div>



        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="select convert(char(10),FinishDate,120) as finishdate,* from ProjectDetails 
                    inner join  Community 
                    on    Community.Community_ID = ProjectDetails.Community_ID 
                    inner join  TypeInfo 
                    on  ProjectDetails.Type_ID = TypeInfo.Type_ID 
                    inner join   Approal
                    on Approal.[ID]=ProjectDetails.ApprovalNumber
                    left join  (select a.* from ProjectImages a where Images_ID = (select min(Images_ID) from ProjectImages where Project_ID = a.Project_ID) )i	
                    on 	 ProjectDetails.Project_ID=i.Project_ID
                    where  Approal.ComminityID = convert(varchar(2),dbo.ProjectDetails.Community_ID) order by Approal.Approal_Date asc" 
            onselecting="SqlDataSource1_Selecting"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlProExcute" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="SELECT * FROM [Pro_Execute] WHERE ([ProID] = @ProID)">
            <SelectParameters>
                <asp:SessionParameter Name="ProID" SessionField="Project_ID" Type="String" DefaultValue="?" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="cmdCommunity" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="select * from dbo.Community where Community_ID =  RIGHT('00'+CAST(Community_ID AS VARCHAR(2)),2) order by Community_ID">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="cmdApproal" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="SELECT  distinct Approal_ID FROM [Approal]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="cmdProjectType" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="SELECT * FROM [TypeInfo]"></asp:SqlDataSource>
    </div>
</asp:Content>
